<template>
  <div class="block">
    <span class="demonstration">页数较少时的效果</span>
    <el-pagination
      background
      :page-size="5"
      layout="prev, pager, next"
      :total="total"
      @current-change="add"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  data () {
    return {
      total: 50
    }
  },
  methods: {
    add (id) {
      console.log(`当前点击的页数：${id}页`)
    }
  }

}
</script>

<style>
</style>
